/**
 * @author LiuYan
 * @date 2021/11/12 8:47
 */
public class Part03 {

    public static void main(String[] args) {
        boolean b1 = true;
        boolean b2 = false;
        boolean b3 = true;
        // & 全真才真，一假全假
        boolean result = b1 & b2;
        System.out.println(result);
        // | 一真则真，全假才假
        boolean result2 = b1 | b2;
        System.out.println(result2);
        // ! 取反
        boolean result3 = !b1;
        System.out.println(result3);

        // && 短路与是只要遇见false立马返回false，后面不再执行
        int a = 12;
        int b = 13;
        boolean result4 = (a < 10) && (b > 20);
        System.out.println(result4);

        // || 短路或是只要遇见true立马返回true，后面的不再执行
        boolean result5 = (a < 10) || (b < 20);
        System.out.println(result5);




    }

}
